/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Principal.java
 *
 * Created on 20-may-2011, 22:13:56
 */

package GUI;

import Interfaz.Interfaz;
import javax.swing.ImageIcon;

/**
 *
 * @author Administrador
 */
public class Principal extends javax.swing.JFrame {

    /** Creates new form Principal */

	//importante
	private Interfaz laInterfaz;

    public Principal(Interfaz laInterfaz) {
        this.laInterfaz=laInterfaz;
		initComponents();
		this.setLocationRelativeTo(null); // Cmabiar icono de java en ventana
       this.setIconImage(new ImageIcon("src/imagenes/marketplus2.png").getImage());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jBLogin = new javax.swing.JButton();
        jBCatalogo = new javax.swing.JButton();
        jBCompras = new javax.swing.JButton();
        jBSucursales = new javax.swing.JButton();
        jBRazonSocial = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(500, 400));
        setResizable(false);
        getContentPane().setLayout(null);

        jBLogin.setText("Personal Market");
        jBLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBLoginActionPerformed(evt);
            }
        });
        getContentPane().add(jBLogin);
        jBLogin.setBounds(20, 100, 130, 23);

        jBCatalogo.setText("Catalogo");
        jBCatalogo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCatalogoActionPerformed(evt);
            }
        });
        getContentPane().add(jBCatalogo);
        jBCatalogo.setBounds(20, 140, 130, 23);

        jBCompras.setText("Compras");
        jBCompras.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBComprasActionPerformed(evt);
            }
        });
        getContentPane().add(jBCompras);
        jBCompras.setBounds(20, 180, 130, 23);

        jBSucursales.setText("Sucursales");
        jBSucursales.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBSucursalesActionPerformed(evt);
            }
        });
        getContentPane().add(jBSucursales);
        jBSucursales.setBounds(20, 220, 130, 23);

        jBRazonSocial.setText("Razon Social");
        jBRazonSocial.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBRazonSocialActionPerformed(evt);
            }
        });
        getContentPane().add(jBRazonSocial);
        jBRazonSocial.setBounds(20, 260, 130, 23);

        jLabel2.setFont(new java.awt.Font("Tempus Sans ITC", 3, 14));
        jLabel2.setText("Bienvenido a Supermercados");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(200, 10, 200, 30);

        jLabel3.setText("RIF: J-122231245          Desarrollado por: Group Delivery");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(110, 330, 320, 20);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/marketplus.png"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(30, 10, 110, 80);

        jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 18));
        jLabel4.setText(" Market Plus");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(240, 40, 120, 30);

        jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/promociones1.jpg"))); // NOI18N
        getContentPane().add(jLabel5);
        jLabel5.setBounds(170, 80, 310, 94);

        jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/promocion2.jpg"))); // NOI18N
        getContentPane().add(jLabel6);
        jLabel6.setBounds(170, 180, 189, 110);

        jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/promocion3.jpg"))); // NOI18N
        getContentPane().add(jLabel7);
        jLabel7.setBounds(370, 180, 90, 110);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jBRazonSocialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRazonSocialActionPerformed
        // TODO add your handling code here:
		RazonSocial razonSocial = new RazonSocial(laInterfaz);
		razonSocial.setVisible(true);
		this.dispose();
		

    }//GEN-LAST:event_jBRazonSocialActionPerformed

	private void jBLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBLoginActionPerformed
		// TODO add your handling code here:
		LoginEmpleados irLoginEmpleados=new LoginEmpleados(laInterfaz);
		irLoginEmpleados.setVisible(true);
		this.dispose();
		

	}//GEN-LAST:event_jBLoginActionPerformed

	private void jBComprasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBComprasActionPerformed
		// TODO add your handling code here:
		
	Compras tipoCompras=new Compras(laInterfaz);
	tipoCompras.setVisible(true);
	this.dispose();
	
	}//GEN-LAST:event_jBComprasActionPerformed

	private void jBSucursalesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSucursalesActionPerformed
		// TODO add your handling code here:
		Sucursales sucursales=new Sucursales(laInterfaz);
		sucursales.setVisible(true);
		this.dispose();
	}//GEN-LAST:event_jBSucursalesActionPerformed

	private void jBCatalogoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCatalogoActionPerformed
		// TODO add your handling code here:
		Catalogo iracatalogo=new Catalogo(laInterfaz);
		iracatalogo.setVisible(true);
		this.dispose();
	}//GEN-LAST:event_jBCatalogoActionPerformed

    /**
    * @param args the command line arguments
    */
  
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBCatalogo;
    private javax.swing.JButton jBCompras;
    private javax.swing.JButton jBLogin;
    private javax.swing.JButton jBRazonSocial;
    private javax.swing.JButton jBSucursales;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    // End of variables declaration//GEN-END:variables

}
